package com.chuangke.sinopecsms;

import java.io.IOException;
import java.util.LinkedList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.chuangke.common.http.HttpResult;

@RestController
@RequestMapping("sms")
public class SmsController {

	@Autowired
	private SmsService sMSService;
	
	@GetMapping(value = "/send")
	public HttpResult list() {
		
		LinkedList<String> params = new LinkedList<>();
		params.add("您负责的督办（XXX）进度不达预期，请您尽快办理") ;
		try {
			sMSService.send("1031179178908635136", params, "18615671351") ;
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return HttpResult.ok() ;
	}
	
}
